% TubeMaskDrawer

clear all;
nrmasks = 2;
[file,chosendir]=uigetfile('*.dcm');

cd(chosendir);
image = dicomread(dicominfo(fullfile(chosendir,file)));

imshow(double(image),[]);

mask = zeros(size(image,1),size(image,2)); 

for i=1:nrmasks
   M=roipoly;
   masks(i).mask=M;
end;
close;

cd ..
save('phantommask.mat','masks')

disp(['Resulting maps are stored in ' pwd filesep 'phantommask.mat' ])